package cn.b.sky.user.service;

import cn.b.sky.user.service.model.Organization;
import cn.b.sky.user.service.model.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrganizationService {
  /**
   * 
  * @Title:selectRootOrg 
  * @Description:查询组织结构根节点
  * @param siteCode
  * @return List<Organization>
  * @author: ZhaoXin
  * @date: 2015-8-3 下午08:24:30
  * @version: V1.0
   */
  public List<Organization> selectRootOrg(String siteCode, boolean isContainLock);

  /**
   * 
  * @Title:selectOrgByParent 
  * @Description:查询组织结构子节点
  * @param siteCode
  * @param parentOrganizationCode
  * @return List<Organization>
  * @author: ZhaoXin
  * @date: 2015-8-3 下午08:24:55
  * @version: V1.0
   */
  public List<Organization> selectOrgByParent(String siteCode, String parentOrganizationCode, boolean isContainLock);

  /**
   * 
   * <strong>Title : selectOrganizationList<br></strong>
   * <strong>Description : </strong>查询组织结构树 <br> 
   * <strong>Create on : 2015-8-7 下午01:26:32<br></strong>
   * <p>
   * @param siteCode 工厂
   * @param isContainLock 是否包含锁定记录
   * @return
   * List<Organization>
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<Organization> selectOrganizationList(String siteCode, boolean isContainLock);

  /**
   * 
   * <strong>Title : selectOrganization<br></strong>
   * <strong>Description : </strong>查询组织结构<br> 
   * <strong>Create on : 2015-8-7 下午04:15:51<br></strong>
   * <p>
   * @param siteCode 工厂
   * @param organizationCode 组织编号
   * @return
   * Organization
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public Organization selectOrganization(@Param("siteCode") String siteCode,
                                         @Param("organizationCode") String organizationCode);

  /**
   * 
   * <strong>Title : insertOrganization<br></strong>
   * <strong>Description : </strong>新增组织<br> 
   * <strong>Create on : 2015-8-10 下午05:01:28<br></strong>
   * <p>
   * @param organization
   * void
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void insertOrganization(Organization organization);

  /**
   * 
   * <strong>Title : updateOrganization<br></strong>
   * <strong>Description : </strong>更新组织<br> 
   * <strong>Create on : 2015-8-10 下午05:05:42<br></strong>
   * <p>
   * @param organization
   * void
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void updateOrganization(Organization organization);

  /**
   * 
   * <strong>Title : deleteOrganization<br></strong>
   * <strong>Description : </strong>删除组织<br> 
   * <strong>Create on : 2015-8-10 下午05:06:20<br></strong>
   * <p>
   * @param siteCode
   * @param organizationCode
   * void
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void deleteOrganization(String siteCode, String organizationCode);

  /**
   * 
   * <strong>Title : selectUsersByOrganization<br></strong>
   * <strong>Description : </strong>获得组织下的所有用户<br> 
   * <strong>Create on : 2015-9-18 下午06:34:29<br></strong>
   * <p>
   * @param siteCode
   * @param organizationCode
   * @return
   * List<UserInfo>
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<UserInfo> selectUsersByOrganization(String siteCode, String organizationCode);
}
